export default {
  id: 'add-user-form',
  form: {
    action: '/auth/login',
    method: 'post',
    model: {
      username: '',
      password: '',
      username2: '',
      username3: '',
      desc: '',
      num1: 0,
      num2: 0,
      mention1: '',
      mention2: '',
      radio: '3',
      checkbox: [],
      rate: 0,
      select: '',
      'select-group': '',
      'select-multiple': [],
      'select-multiple-group': [],
      'select-v2': '',
      'select-v2-group': '',
      slider: 0,
      switch: true,
      'date-picker': '',
      'time-picker': '',
      'time-select': '',
      transfer: [],
      'tree-select': '',
      cascader: [],
      'color-picker': '',
      'image-upload': '',
      'picture-card-upload': [],
      'picture-upload': [],
      'file-upload': [],
      'drag-upload': [],
      'wang-editor': '',
      'wang-editor-simple': ''
    },
    attrs: {
      'label-width': 100,
      style: {
        'grid-template-areas': `
              "username username"
              "password ."
              "username2 username3"
              "desc desc"
              "num1 num2"
              "mention1 mention2"
              "radio radio"
              "checkbox checkbox"
              "rate ."
              "select select-group"
              "select-multiple select-multiple-group"
              "select-v2 select-v2-group"
              "slider switch"
              "date-picker datetime-picker"
              "time-picker time-select"
              "transfer transfer"
              "tree-select ."
              "example-autocomplete template-autocomplete"
              "cascader color-picker"
              "image-upload ."
              "picture-card-upload picture-card-upload"
              "picture-upload picture-upload"
              "file-upload file-upload"
              "drag-upload drag-upload"
              "wang-editor wang-editor"
              "wang-editor-simple wang-editor-simple"
            `
      }
    }
  },
  submitText: '创建',
  resetText: '重置',
  fields: [
    {
      'field-type': 'input',
      'field-label': '用户名',
      id: 'username',
      model: 'username',
      attrs: {
        placeholder: '用户名'
      },
      'grid-area': 'username'
    },
    {
      'field-type': 'input',
      'field-label': '密码',
      id: 'password',
      model: 'password',
      attrs: {
        type: 'password',
        placeholder: '密码'
      },
      'grid-area': 'password'
    },
    {
      'field-type': 'input',
      'field-label': '用户名',
      id: 'username2',
      model: 'username2',
      attrs: {
        placeholder: '用户名'
      },
      'grid-area': 'username2'
    },
    {
      'field-type': 'input',
      'field-label': '用户名',
      id: 'username3',
      model: 'username3',
      attrs: {
        placeholder: '用户名'
      },
      'grid-area': 'username3'
    },
    {
      'field-type': 'input',
      'field-label': '用户名',
      id: 'desc',
      model: 'desc',
      attrs: {
        type: 'textarea',
        placeholder: '用户名'
      },
      'grid-area': 'desc'
    },
    {
      'field-type': 'input-number',
      'field-label': '数字1',
      id: 'num1',
      model: 'num1',
      attrs: {
        placeholder: '数字1'
      },
      'grid-area': 'num1'
    },
    {
      'field-type': 'input-number',
      'field-label': '数字2',
      id: 'num2',
      model: 'num2',
      attrs: {
        placeholder: '数字22',
        'controls-position': 'right'
      },
      'grid-area': 'num2'
    },
    {
      'field-type': 'mention',
      options: [
        {
          label: 'Fuphoenixes',
          value: 'Fuphoenixes'
        },
        {
          label: 'kooriookami',
          value: 'kooriookami'
        },
        {
          label: 'Jeremy',
          value: 'Jeremy'
        },
        {
          label: 'btea',
          value: 'btea'
        }
      ],
      'field-label': '提及1',
      id: 'mention1',
      model: 'mention1',
      attrs: {
        placeholder: '提及1'
      },
      'grid-area': 'mention1'
    },
    {
      'field-type': 'mention',
      options: [
        {
          label: 'Fuphoenixes',
          value: 'Fuphoenixes'
        },
        {
          label: 'kooriookami',
          value: 'kooriookami'
        },
        {
          label: 'Jeremy',
          value: 'Jeremy'
        },
        {
          label: 'btea',
          value: 'btea'
        }
      ],
      'field-label': '提及2',
      id: 'mention2',
      model: 'mention2',
      attrs: {
        type: 'textarea',
        placeholder: '提及2'
      },
      'grid-area': 'mention2'
    },
    {
      'field-type': 'radio-group',
      name: 'radio',
      options: [
        {
          label: 'Option A',
          value: '3'
        },
        {
          label: 'Option B',
          value: '56'
        },
        {
          label: 'Option C',
          value: '9'
        },
        {
          label: 'Option D',
          value: '22'
        }
      ],
      'field-label': '单选',
      id: 'radio',
      model: 'radio',
      attrs: {},
      'grid-area': 'radio'
    },
    {
      'field-type': 'checkbox-group',
      name: 'checkbox',
      options: [
        {
          label: 'Option A',
          value: '3'
        },
        {
          label: 'Option B',
          value: '56'
        },
        {
          label: 'Option C',
          value: '9'
        },
        {
          label: 'Option D',
          value: '22'
        }
      ],
      'field-label': '多选',
      id: 'checkbox',
      model: 'checkbox',
      attrs: {},
      'grid-area': 'checkbox'
    },
    {
      'field-type': 'rate',
      'field-label': '评分',
      id: 'rate',
      model: 'rate',
      attrs: {
        colors: ['#99A9BF', '#F7BA2A', '#FF9900']
      },
      'grid-area': 'rate'
    },
    {
      'field-type': 'select',
      options: [
        {
          label: 'Option A',
          value: '3'
        },
        {
          label: 'Option B',
          value: '56'
        },
        {
          label: 'Option C',
          value: '9'
        },
        {
          label: 'Option D',
          value: '22'
        }
      ],
      'field-label': '单选框',
      id: 'select',
      model: 'select',
      attrs: {},
      'grid-area': 'select'
    },
    {
      'field-type': 'select-group',
      options: [
        {
          label: 'Option A',
          options: [
            {
              label: 'Option A 1',
              value: 'Option A 1'
            },
            {
              label: 'Option A 2',
              value: 'Option A 2'
            }
          ]
        },
        {
          label: 'Option B',
          options: [
            {
              label: 'Option B 1',
              value: 'Option B 1'
            },
            {
              label: 'Option B 2',
              value: 'Option B 2'
            }
          ]
        },
        {
          label: 'Option C',
          options: [
            {
              label: 'Option C 1',
              value: 'Option C 1'
            },
            {
              label: 'Option C 2',
              value: 'Option C 2'
            }
          ]
        },
        {
          label: 'Option D',
          options: [
            {
              label: 'Option D 1',
              value: 'Option D 1'
            },
            {
              label: 'Option D 2',
              value: 'Option D 2'
            }
          ]
        }
      ],
      'field-label': '单选框',
      id: 'select-group',
      model: 'select-group',
      attrs: {},
      'grid-area': 'select-group'
    },
    {
      'field-type': 'select',
      options: [
        {
          label: 'Option A',
          value: '3'
        },
        {
          label: 'Option B',
          value: '56'
        },
        {
          label: 'Option C',
          value: '9'
        },
        {
          label: 'Option D',
          value: '22'
        }
      ],
      'field-label': '单选框',
      id: 'select-multiple',
      model: 'select-multiple',
      attrs: {
        multiple: true,
        'collapse-tags': true,
        'collapse-tags-tooltip': true
      },
      'grid-area': 'select-multiple'
    },
    {
      'field-type': 'select-group',
      options: [
        {
          label: 'Option A',
          options: [
            {
              label: 'Option A 1',
              value: 'Option A 1'
            },
            {
              label: 'Option A 2',
              value: 'Option A 2'
            }
          ]
        },
        {
          label: 'Option B',
          options: [
            {
              label: 'Option B 1',
              value: 'Option B 1'
            },
            {
              label: 'Option B 2',
              value: 'Option B 2'
            }
          ]
        },
        {
          label: 'Option C',
          options: [
            {
              label: 'Option C 1',
              value: 'Option C 1'
            },
            {
              label: 'Option C 2',
              value: 'Option C 2'
            }
          ]
        },
        {
          label: 'Option D',
          options: [
            {
              label: 'Option D 1',
              value: 'Option D 1'
            },
            {
              label: 'Option D 2',
              value: 'Option D 2'
            }
          ]
        }
      ],
      'field-label': '单选框',
      id: 'select-multiple-group',
      model: 'select-multiple-group',
      attrs: {
        multiple: true,
        'collapse-tags': true
      },
      'grid-area': 'select-multiple-group'
    },

    {
      'field-type': 'select-v2',
      options: Array.from({ length: 1000 }).map((_, idx) => ({
        value: `Option ${idx + 1}`,
        label: `${['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'][idx % 10]}${idx}`
      })),
      'field-label': '单选框',
      id: 'select-v2',
      model: 'select-v2',
      attrs: {},
      'grid-area': 'select-v2'
    },
    {
      'field-type': 'select-v2-group',
      options: Array.from({ length: 10 }).map((_, idx) => {
        const label = idx + 1
        return {
          value: `Group ${label}`,
          label: `Group ${label}`,
          options: Array.from({ length: 10 }).map((_, idx) => ({
            value: `Option ${idx + 1 + 10 * label}`,
            label: `${['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'][idx % 10]}${idx + 1 + 10 * label}`
          }))
        }
      }),
      'field-label': '单选框',
      id: 'select-v2-group',
      model: 'select-v2-group',
      attrs: {},
      'grid-area': 'select-v2-group'
    },
    {
      'field-type': 'slider',
      'field-label': '滑块',
      id: 'slider',
      model: 'slider',
      attrs: {},
      'grid-area': 'slider'
    },
    {
      'field-type': 'switch',
      'field-label': '开关',
      id: 'switch',
      model: 'switch',
      attrs: {},
      'grid-area': 'switch'
    },
    {
      'field-type': 'date-picker',
      'field-label': '日期选择',
      id: 'date-picker',
      model: 'date-picker',
      attrs: {
        'value-format': 'YYYY-MM-DD HH:mm:ss'
      },
      'grid-area': 'date-picker'
    },
    {
      'field-type': 'date-picker',
      'field-label': '日期选择',
      id: 'datetime-picker',
      model: 'datetime-picker',
      attrs: {
        type: 'datetime',
        'value-format': 'YYYY-MM-DD HH:mm:ss'
      },
      'grid-area': 'datetime-picker'
    },
    {
      'field-type': 'time-picker',
      'field-label': '时间选择',
      id: 'time-picker',
      model: 'time-picker',
      attrs: {
        'arrow-control': true,
        'value-format': 'HH:mm:ss'
      },
      'grid-area': 'time-picker'
    },
    {
      'field-type': 'time-select',
      'field-label': '时间选择',
      id: 'time-select',
      model: 'time-select',
      attrs: {},
      'grid-area': 'time-select'
    },
    {
      'field-type': 'transfer',
      data: Array.from({ length: 20 }).map((_, i) => ({
        key: i,
        label: `Option ${i}`,
        disabled: i % 4 === 0
      })),
      'field-label': '穿梭框',
      id: 'transfer',
      model: 'transfer',
      attrs: {},
      'grid-area': 'transfer'
    },
    {
      'field-type': 'tree-select',
      data: [
        {
          value: '1',
          label: 'Level one 1',
          children: [
            {
              value: '1-1',
              label: 'Level two 1-1',
              children: [
                {
                  value: '1-1-1',
                  label: 'Level three 1-1-1'
                }
              ]
            }
          ]
        },
        {
          value: '2',
          label: 'Level one 2',
          children: [
            {
              value: '2-1',
              label: 'Level two 2-1',
              children: [
                {
                  value: '2-1-1',
                  label: 'Level three 2-1-1'
                }
              ]
            },
            {
              value: '2-2',
              label: 'Level two 2-2',
              children: [
                {
                  value: '2-2-1',
                  label: 'Level three 2-2-1'
                }
              ]
            }
          ]
        },
        {
          value: '3',
          label: 'Level one 3',
          children: [
            {
              value: '3-1',
              label: 'Level two 3-1',
              children: [
                {
                  value: '3-1-1',
                  label: 'Level three 3-1-1'
                }
              ]
            },
            {
              value: '3-2',
              label: 'Level two 3-2',
              children: [
                {
                  value: '3-2-1',
                  label: 'Level three 3-2-1'
                }
              ]
            }
          ]
        }
      ],
      'field-label': '树形选择',
      id: 'tree-select',
      model: 'tree-select',
      attrs: {},
      'grid-area': 'tree-select'
    },
    {
      'field-type': 'example-autocomplete',
      'field-label': '自动填充',
      id: 'example-autocomplete',
      model: 'example-autocomplete',
      'grid-area': 'example-autocomplete'
    },
    {
      'field-type': 'template-autocomplete',
      'field-label': '自动填充',
      id: 'template-autocomplete',
      model: 'template-autocomplete',
      'grid-area': 'template-autocomplete'
    },
    {
      'field-type': 'cascader',
      options: [
        {
          value: 'guide',
          label: 'Guide',
          children: [
            {
              value: 'disciplines',
              label: 'Disciplines',
              children: [
                {
                  value: 'consistency',
                  label: 'Consistency'
                },
                {
                  value: 'feedback',
                  label: 'Feedback'
                },
                {
                  value: 'efficiency',
                  label: 'Efficiency'
                },
                {
                  value: 'controllability',
                  label: 'Controllability'
                }
              ]
            },
            {
              value: 'navigation',
              label: 'Navigation',
              children: [
                {
                  value: 'side nav',
                  label: 'Side Navigation'
                },
                {
                  value: 'top nav',
                  label: 'Top Navigation'
                }
              ]
            }
          ]
        },
        {
          value: 'component',
          label: 'Component',
          children: [
            {
              value: 'basic',
              label: 'Basic',
              children: [
                {
                  value: 'layout',
                  label: 'Layout'
                },
                {
                  value: 'color',
                  label: 'Color'
                },
                {
                  value: 'typography',
                  label: 'Typography'
                },
                {
                  value: 'icon',
                  label: 'Icon'
                },
                {
                  value: 'button',
                  label: 'Button'
                }
              ]
            },
            {
              value: 'form',
              label: 'Form',
              children: [
                {
                  value: 'radio',
                  label: 'Radio'
                },
                {
                  value: 'checkbox',
                  label: 'Checkbox'
                },
                {
                  value: 'input',
                  label: 'Input'
                },
                {
                  value: 'input-number',
                  label: 'InputNumber'
                },
                {
                  value: 'select',
                  label: 'Select'
                },
                {
                  value: 'cascader',
                  label: 'Cascader'
                },
                {
                  value: 'switch',
                  label: 'Switch'
                },
                {
                  value: 'slider',
                  label: 'Slider'
                },
                {
                  value: 'time-picker',
                  label: 'TimePicker'
                },
                {
                  value: 'date-picker',
                  label: 'DatePicker'
                },
                {
                  value: 'datetime-picker',
                  label: 'DateTimePicker'
                },
                {
                  value: 'upload',
                  label: 'Upload'
                },
                {
                  value: 'rate',
                  label: 'Rate'
                },
                {
                  value: 'form',
                  label: 'Form'
                }
              ]
            },
            {
              value: 'data',
              label: 'Data',
              children: [
                {
                  value: 'table',
                  label: 'Table'
                },
                {
                  value: 'tag',
                  label: 'Tag'
                },
                {
                  value: 'progress',
                  label: 'Progress'
                },
                {
                  value: 'tree',
                  label: 'Tree'
                },
                {
                  value: 'pagination',
                  label: 'Pagination'
                },
                {
                  value: 'badge',
                  label: 'Badge'
                }
              ]
            },
            {
              value: 'notice',
              label: 'Notice',
              children: [
                {
                  value: 'alert',
                  label: 'Alert'
                },
                {
                  value: 'loading',
                  label: 'Loading'
                },
                {
                  value: 'message',
                  label: 'Message'
                },
                {
                  value: 'message-box',
                  label: 'MessageBox'
                },
                {
                  value: 'notification',
                  label: 'Notification'
                }
              ]
            },
            {
              value: 'navigation',
              label: 'Navigation',
              children: [
                {
                  value: 'menu',
                  label: 'Menu'
                },
                {
                  value: 'tabs',
                  label: 'Tabs'
                },
                {
                  value: 'breadcrumb',
                  label: 'Breadcrumb'
                },
                {
                  value: 'dropdown',
                  label: 'Dropdown'
                },
                {
                  value: 'steps',
                  label: 'Steps'
                }
              ]
            },
            {
              value: 'others',
              label: 'Others',
              children: [
                {
                  value: 'dialog',
                  label: 'Dialog'
                },
                {
                  value: 'tooltip',
                  label: 'Tooltip'
                },
                {
                  value: 'popover',
                  label: 'Popover'
                },
                {
                  value: 'card',
                  label: 'Card'
                },
                {
                  value: 'carousel',
                  label: 'Carousel'
                },
                {
                  value: 'collapse',
                  label: 'Collapse'
                }
              ]
            }
          ]
        },
        {
          value: 'resource',
          label: 'Resource',
          children: [
            {
              value: 'axure',
              label: 'Axure Components'
            },
            {
              value: 'sketch',
              label: 'Sketch Templates'
            },
            {
              value: 'docs',
              label: 'Design Documentation'
            }
          ]
        }
      ],
      'field-label': '级联',
      id: 'cascader',
      model: 'cascader',
      attrs: {},
      'grid-area': 'cascader'
    },
    {
      'field-type': 'color-picker',
      'field-label': '取色器',
      id: 'color-picker',
      model: 'color-picker',
      attrs: {},
      'grid-area': 'color-picker'
    },
    {
      'field-type': 'image-upload',
      'field-label': '图片上传',
      id: 'image-upload',
      model: 'image-upload',
      attrs: {
        action: '/mock-api/file/image'
      },
      'grid-area': 'image-upload'
    },
    {
      'field-type': 'picture-card-upload',
      'field-label': '照片墙',
      id: 'picture-card-upload',
      model: 'picture-card-upload',
      attrs: {
        action: '/mock-api/file/image'
      },
      'grid-area': 'picture-card-upload'
    },
    {
      'field-type': 'picture-upload',
      'field-label': '图片列表',
      id: 'picture-upload',
      model: 'picture-upload',
      attrs: {
        action: '/mock-api/file/image'
      },
      'grid-area': 'picture-upload'
    },
    {
      'field-type': 'file-upload',
      'field-label': '文件列表',
      id: 'file-upload',
      model: 'file-upload',
      attrs: {
        action: '/mock-api/file/image'
      },
      'grid-area': 'file-upload'
    },
    {
      'field-type': 'drag-upload',
      'field-label': '拖拽列表',
      id: 'drag-upload',
      model: 'drag-upload',
      attrs: {
        action: '/mock-api/file/image'
      },
      'grid-area': 'drag-upload'
    },
    {
      'field-type': 'wang-editor',
      'field-label': '富文本',
      id: 'wang-editor',
      model: 'wang-editor',
      attrs: {
        height: '350px',
        toolbarConfig: {},
        editorConfig: {
          placeholder: '请输入内容...'
        },
        mode: 'default'
      },
      'grid-area': 'wang-editor'
    },
    {
      'field-type': 'wang-editor',
      'field-label': '富文本',
      id: 'wang-editor-simple',
      model: 'wang-editor-simple',
      attrs: {
        height: '350px',
        toolbarConfig: {},
        editorConfig: {
          placeholder: '请输入内容...'
        },
        mode: 'simple'
      },
      'grid-area': 'wang-editor-simple'
    }
  ]
} as FormGlobalType
